import { get, post } from '@/lin/plugin/axios'

/**
 * 销售购买统计相关API
 */

/**
 * 获取销售购买统计数据
 */
export const getSalesPurchaseStats = (params = {}) => {
  return get('v1/sales-purchase-stats/stats', params)
}

/**
 * 获取销售购买记录列表
 */
export const getSalesPurchaseRecords = (params = {}) => {
  return get('v1/sales-purchase-stats/records', params)
}

/**
 * 获取销售趋势数据
 */
export const getSalesTrend = (params = {}) => {
  return get('v1/sales-purchase-stats/sales-trend', params)
}

/**
 * 获取购买趋势数据
 */
export const getPurchaseTrend = (params = {}) => {
  return get('v1/sales-purchase-stats/purchase-trend', params)
}

/**
 * 导出统计数据
 */
export const exportSalesPurchaseStats = (data) => {
  return post('v1/sales-purchase-stats/export', data)
}

/**
 * 获取统计概览
 */
export const getSalesPurchaseOverview = (params = {}) => {
  return get('v1/sales-purchase-stats/overview', params)
} 